Communication control apparatus, system, and method therefor

ABSTRACT

In a communication control method for wireless communication between a first communication device and a second communication device through a wireless communication unit, identification information is notified from the second communication device to the first communication device by using a communication unit other than the wireless communication unit. Wireless communication between the first and second communication devices is performed by the wireless communication unit using the first communication parameter shared in advance, and authentication processing based on identification information is performed. When authentication is acquired by this authentication processing, the second communication parameter to be set with respect to a wireless communication unit is shared by the first and second communication devices through the above wireless communication. Parameters for wireless communication between the first and second communication devices are set in the wireless communication unit by using the second communication parameter shared in this manner.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of application Ser. No. 11/282,065,filed Nov. 16, 2005, the entire disclosure of which is herebyincorporated by reference.

FIELD OF THE INVENTION

The present invention relates to a technique setting various kinds ofparameters necessary for network connection in a communication device.

BACKGROUND OF THE INVENTION

With regard to communication parameter setting, the automation ofparameter setting using an upper layer protocol is now underway in wirednetworks. For example, it is well known that a DHCP (Dynamic HostConfiguration Protocol) server is used to provide an IP address solutionfor a device by automatically setting network parameters for the device.In addition, network parameters can be automatically set for the deviceby using a DNS (Domain Name Server) server to acquire the IP addressesof other devices.

In addition, a wireless network requires very complicated lower layersettings, which differ according to wireless communication methods, inaddition to the use of the upper layer protocol in the wired network.The lower layer protocols are listed, for example, 802.11b, 802.11a,Bluetooth, WiMedia, Wireless USB, and Wireless 1394. Because of thereare a plurality of wireless communication methods using the samefrequency, and because authentication/encryption, reinforced forwireless communication, must be set in accordance with a network, theparameters to be set are varied. These parameter settings are stillperformed manually, often forcing a user to perform cumbersomeoperations.

According to the invention in U.S. Publication No. US2002/0147819A1(Japanese Patent Laid-Open No. 2002-359623), relating to “wirelesscommunication setting method”, parameters required for communicationusing a given wireless communication method are set by using acommunication different from the wireless communication. According tothis arrangement, since parameters for the above wireless communicationmethod are set by a communication based on another communication method,the user does not need to perform the setting by himself/herself.According to the arrangement disclosed in Japanese Patent Laid-Open No.2003-218730, before setting the wireless information of a device, thenetwork information (an ESSID, mode, and channel) is set, and wirelesscommunication parameters to be generally used are set by using the setwireless network for registration.

The above prior art reduces cumbersome manual operations performed by auser. However, no solution is provided for the problem of security whichis in a tradeoff relationship with cumbersome operations and the problemof expandability, e.g., simultaneous registrations of a plurality ofwireless devices.

When, for example, wireless communication setting is to be performed bywired connection using the method disclosed in U.S. Publication No.US2002/0147819A1 (Japanese Patent Laid-Open No. 2002-359623), wiredconnection is performed between a given device and a device for whichsetting is to be performed, and identification associated with necessarywireless communication parameter setting can be completed(identification for one-to-one parameter setting). However, in order toalso perform the wireless communication setting associated with otherdevices which are not connected by wire, identification for parametersetting must be repeatedly performed for each of them by connecting tothem via wire. For this reason, when parameter setting is to beperformed for many devices, it takes much time before completion.

When wireless parameter setting is to be performed upon shiftingwireless parameter setting for a device in a specific registration mode,no method is currently available to discriminate a device for whichwireless parameter setting is to be performed and other devices, asdisclosed in Japanese Patent Laid-Open No. 2003-218730. For this reason,the parameter settings of the wireless communication could, in thiscase, be acquired by another device while spoofing without permission.Hence there is a risk of easily allowing wireless communication withmalicious device in a subsequent steady state.

SUMMARY OF THE INVENTION

The present invention has been made in consideration of the aboveproblems, and has as its object to easily set communication parametersbetween communication devices with safety in terms of security.

Another object of the present invention is to safely and quickly setcommunication parameters for three or more communication devices.

In order to achieve the above objects, according to one aspect of thepresent invention, there is provided a communication control method forcommunication between a first communication device and a secondcommunication device through wireless communication means, comprising: afirst notification step of notifying, from the second communicationdevice, the first communication device of identification information byusing another communication means other than the wireless communicationmeans; an authentication step of executing wireless communicationbetween the first communication device and the second communicationdevice by using a first communication parameter shared in advance viathe wireless communication means, performing authentication based on theidentification information; a sharing step of sharing a secondcommunication parameter to be set between the first communication deviceand the second communication device through the wireless communicationin accordance with an authentication result obtained in theauthentication step; and a setting step of setting, in the wirelesscommunication means, a parameter for wireless communication between thefirst communication device and the second communication device by usingthe second communication parameter shared in the sharing step.

Other features and advantages of the present invention will be apparentfrom the following description taken in conjunction with theaccompanying drawings, in which like reference characters designate thesame or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a view showing the arrangement of a wireless communicationsystem according to the first embodiment;

FIG. 2 is a view showing a frame format which is transmitted/receivedthrough wired communication between device A and device B according tothis embodiment;

FIG. 3 is a view showing a frame format which is transmitted/receivedthrough wireless communication between device A and device B accordingto this embodiment;

FIG. 4 is a view showing a communication sequence in device A and deviceB in the wireless communication system according to the firstembodiment;

FIGS. 5A and 5B are flowcharts for explaining a communication sequencein device A according to the first embodiment;

FIGS. 6A and 6B are flowcharts for explaining a communication sequencein device B according to the first embodiment;

FIG. 7 is a view showing the arrangement of a wireless communicationsystem according to the second to fourth embodiments;

FIGS. 8A and 8B are views showing a communication sequence betweendevices in the wireless communication system according to the secondembodiment;

FIGS. 9A and 9B are flowcharts for explaining a communication sequencein device A according to the second embodiment;

FIGS. 10A and 10B are flowcharts for explaining a communication sequencein device B according to the second embodiment;

FIGS. 11A and 11B are flowcharts for device C and device D according tothe second embodiment;

FIGS. 12A and 12B are views showing a communication sequence betweendevices in the wireless communication system according to the thirdembodiment;

FIGS. 13A and 13C are flowcharts for explaining a communication sequencein device A according to the fourth embodiment;

FIGS. 14A to 14C are flowcharts for explaining a communication sequencein device B according to the fourth embodiment;

FIG. 15 is a view showing data as a seed (base information) for thegeneration of a group identification code and computation therefor; and

FIG. 16 is a flowchart for the generation of a group identification codeby device C or D.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will now be described indetail in accordance with the accompanying drawings.

<First Embodiment>

FIG. 1 is a view showing the overall arrangement of a wirelesscommunication system according to this embodiment. Referring to FIG. 1,an image capturing device 100 functions as the first wirelesscommunication device according to the embodiment and has a wirelesscommunication means. A printer 101 is a printer functioning as thesecond wireless communication device according to this embodiment. Theimage capturing device 100 and printer 101 can transmit/receive dataincluding commands and captured images to/from each other by wirelesscommunication based on the spread spectrum system such as wireless LANcommunication based on IEEE802.11b standard. In addition, wiredconnection has been performed between the image capturing device 100 andthe printer 101 by a wired cable 102 serving as the second communicationmeans.

FIG. 1 shows an example of the hardware arrangements of the imagecapturing device 100 and printer 101. In the image capturing device 100,a control unit 121 controls an image capturing unit 122 and operationunit 123 in accordance with an operation instruction from the operationunit 123 by executing control programs stored in a memory (not shown).Control to be described later with reference to a flowchart is alsoexecuted by the control unit 121. The image capturing unit 122 includesa lens optical system and image sensing element. The operation unit 123comprises various kinds of operation buttons and a display device (e.g.,a liquid crystal panel). A wired communication I/F 124 realizes wiredcommunication with an external device. A wireless communication I/F 125realizes wireless communication with an external device.

In the printer 101, a control unit 141 drives a printer unit 142 toperform printout operation in accordance with an operation instructionfrom an operation unit 143 or data input from a host apparatus byexecuting the control program stored in a memory (not shown). Control tobe described later with reference to a flowchart is also performed bythe control unit 141. The printer unit 142 executes printing on a printsheet. The operation unit 143 comprises various kinds of buttons and adisplay device (e.g., a liquid crystal panel). A wired communication I/F144 realizes wired communication with an external device. A wirelesscommunication I/F 145 realizes wireless communication with an externaldevice.

FIG. 2 is a view showing the frame format of data flowing on the wiredcable 102 between the image capturing device 100 and the printer 101when wireless communication parameters are to be set. A frame format 200contains header information 201, a command/event name 202, informationelements (203 to 205), and a CRC 207 serving as a checksum for data. Theinformation elements include the information element type 203 (UID:unique identifier in FIG. 2), the information length 204 (16 bytes inFIG. 2), and the information content 205 (representing UID data:CA206307-0C7E-33D4-83CF-01E03E8AAE55 in FIG. 2). The second andsubsequent information elements are written at and after “206” in thesame arrangement.

FIG. 3 is a view showing the frame format of data flowing on a wirelesscommunication channel between the image capturing device 100 and theprinter 101 when wireless communication parameters are to be set. Aframe format 300 includes header information 301, a command/event name302, information elements (303 to 305 and 306 to 308), and a CRC 309serving as a checksum for the frame. The information elements comprisethe information element type 303 (UID: unique identifier in FIG. 3), theinformation length 304 (16 bytes in FIG. 3), and the information content305 (UID data in FIG. 3). Likewise, the subsequent information elementsinclude the information element type 306 (representing ConfigData inFIG. 3), the information length 307, and the information content 308(Configuration parameter data in FIG. 3).

The detailed contents of the Configuration parameter data of theinformation content 308 are shown in a list 320, and specific values areshown as Configuration parameter data 310. The following are the settingcontents of the Configuration parameter data 310 shown in FIG. 3. Firstof all, SSID type (0x00)=ESSID (0x01) has an information length of fourbytes and a value “PRT1”. Note that ESSID is a network identifier. OnlyWEP104 is ON when Encryption Type (0x02)=0x0004. A WEP key (0x03)comprises “12EFAC52437F447A” with a length of 16 bytes. In addition,network mode (0x04)=Adhoc (0x01) and channel (0x05)=7 are set.

A sequence to be executed between device A (digital camera 100) anddevice B (printer 101) when wireless communication parameters are to beset will be described with reference to FIG. 4. FIG. 4 is a view showinga wireless communication parameter setting sequence in the firstembodiment.

First of all, device A and device B establish wired connection betweeninterfaces (the wired communication I/Fs 124 and 144) through wires Aand B (501). In response to the detection of this wired connection as atrigger, device A issues a pairing start request to device B (502).Device B returns a pairing start confirmation to device A (503). DeviceA then transmits an individual identification code as a unique ID todevice B (the transmission of the UID data 205 in FIG. 2) (504). Uponreceiving the individual identification code, device B returns anindividual identification code confirmation to device A (505). At thesame time, device A and device B shift to the Anonymous mode (the modeof allowing unspecified persons to make connection) (506, 507). In thiscase, the Anonymous mode indicates that network information has been setby specific operation installed in the device in advance (wirelesscommunication setting has been performed with communication parametersshared in advance). That is, the Anonymous mode in this case indicates amode of allowing devices which can recognize specific operation tocommunicate with each other.

Wireless means A (wireless communication through the wirelesscommunication I/F 125) which controls wireless connection of device Aissues a wireless connection request to wireless means B (wirelesscommunication through the wireless communication I/F 145) which controlswireless connection of device B (508). Wireless means B of device Btransmits a wireless connection response as a response signal for therequest to wireless means A of device A (509). Device A transmits, todevice B (510), a wireless information request to which the individualidentification code exchanged by the previous transmission/reception ofthe individual identification code (504, 505) is added. If the receivedindividual identification code coincides with the individualidentification code (504) previously sent from device A, device Breturns a wireless information response containing parameters necessaryfor wireless connection (the Configuration parameter data 308 includingan ESSID, encryption method, authentication method, and the like) (511).Device A transmits a wireless disconnection request to device B (512).Device B transmits a wireless disconnection response as a confirmationfor the request to device A (513). Thereafter, device A and device Breturn to the normal mode (514, 515). Device A then performs wirelessconnection to device B by using the parameters acquired from device B,thereby starting communication in the normal mode.

The operations of device A and device B will be described in detail nextwith reference to the flowcharts of FIGS. 5A, 5B, 6A, and 6B and FIG. 4.

FIGS. 5A and 5B are flowcharts showing the operation of device A(digital camera 100) in the first embodiment in detail. Upon detectingwired connection, device A recognizes the start of pairing (step S601).When pairing starts, an individual identification code as a unique ID iscalculated (step S602). This individual identification code ispreferably a random number that can avoid collision with other devicesat a probability of nearly 100%. For example, an individualidentification code is calculated by using the MAC address of a wirelessinterface, a system clock at the corresponding time, or the like. Inaddition, as a method of generating individual identification codes,there is available a method of encrypting given identification codeoriginal data (the same for each system) as bases by using the same PinCode (identification number) in accordance with the same algorithm inboth devices, and using the results as individual identification codes.According to this method, both devices can check individualidentification codes as well as authentication. This technique canprevent any device user who does not have the same Pin Code fromperforming pairing without permission. Device A then requests a remotedevice (to be referred to as device B hereinafter) in wired connectionto start pairing (502) (step S603). At the same time, the pairing timeris started (step S604). While waiting for the reception of a response tothe pairing start (pairing start confirmation (503)) from device B (stepS605), device A checks the timeout of a pairing timer started in stepS604 (step S607).

When receiving a pairing start confirmation from device B before thetimeout, device A transmits the individual identification code as aunique ID which is calculated in step S602 (504, step S606). Until thetimeout of the pairing timer occurs (step S610), device A waits for thereception of an individual identification code confirmation (steps S608and S609). If device A receives an individual identification codeconfirmation before the occurrence of timeout and the confirmation is apermission for the individual identification code, device A sets thewireless communication unit (wireless communication I/F 125) of itselfwith wireless information for registration to set the Anonymous mode(steps S608 and S611, 507). Device A then transmits a wirelessconnection request by the wireless communication (step S612, 508). Untilthe timeout of the pairing timer occurs (step S614), device A waits forthe reception of a wireless connection response (step S613).

When a wireless connection response is received before the occurrence oftimeout (509), a wireless information request to which the individualidentification code calculated at step S602 is added is transmitted(step S615, 510). Until timeout occurs (step S619), device A waits for awireless information response (step S616). If a wireless informationresponse is received before the occurrence of timeout (511), device Achecks whether the individual identification code in the received framecoincides with the previous individual identification code (step S617).If they coincide with each other, wireless information is stored (stepS618). Thereafter, device A issues a wireless disconnection request(step S623), and waits for a wireless disconnection response until theoccurrence of timeout (steps S624 and S625). If a wireless disconnectionresponse is received before the occurrence of timeout (513), wirelesscommunication in the normal mode is started by using the wirelessinformation stored in step S618 (step S626, 515).

Subsequently, the pairing timer is stopped (step S620), and informationindicating a pairing success is displayed (step S621). When timeoutoccurs at each portion (step S607, S610, S614, S619, or S625) or anindividual identification rejection is received (step S609), pairingfailure display indicating that pairing has failed is displayed (stepS622).

FIGS. 6A and 6B are flowcharts showing the operation of device B(printer 101) according to this embodiment in detail. When wiredconnection is detected (step S700), device B checks the reception of apairing start request (step S701). Upon receiving a pairing startrequest (502), device B transmits a pairing start confirmation to therequest source (device A) (step S702, 503). Upon receiving an individualidentification code representing a unique ID by a wire from the requestsource (step S703, 504), device B checks whether the individualidentification code is permitted, i.e., pairing can be started. If apairing start is OK, device B transmits an individual identificationcode confirmation indicating a individual identification code permission(step S705, 505). If a pairing start is NG (rejected), device Btransmits an individual identification code rejection (step S704).

Upon permitting a pairing start and transmitting an individualidentification code confirmation, device B sets wireless communicationin the Anonymous mode by setting wireless information for registration(step S706). The pairing timer is started (step S708) at the same timewhen the transmission of a designated beacon is started (step S707,506). Until timeout occurs (step S710), device B waits for thecompletion of wireless connection to an opposing device (step S709).Note that when device B receives a wireless connection request from theopposing device (device A) and returns a wireless connection response inresponse to this (509), wireless connection is complete.

Upon confirming the completion of wireless connection to the opposingdevice before timeout, device B waits for the reception of a wirelessinformation request (step S711) until the occurrence of timeout (stepS712). Upon receiving a wireless information request before theoccurrence of timeout (510), device B checks whether the individualidentification code added to the wireless connection request coincideswith the individual identification code received by previous wiredconnection (step S713). If they do not coincide, device B transmits awireless information request rejection (step S715), and stops thepairing timer, thereby terminating this processing (step S721). At thistime, device B may set MAC address filtering by using the MAC addresscontained in the wireless connection request and temporarily inhibitconnection of the device. When the individual identification codescoincide with each other, device B transmits a wireless informationresponse containing parameters required for wireless connection (theConfiguration parameter data 308 including an ESSID as a networkidentifier, an encryption method to be used, an authentication method,and the like) (step S714, 511). Subsequently, until timeout occurs (stepS717), device B waits for the reception of a wireless disconnectionrequest (step S716). Upon receiving a wireless disconnection requestbefore the occurrence of timeout (512), device B transmits a wirelessdisconnection response after the reception (step S718, 513), and stopsthe pairing timer (step S719), thereby shifting the operation to thenormal operation mode and terminating this processing (step S720, 514).When timeout occurs at each portion (step S710, S712, or S717), device Bstops the pairing timer and terminates this processing (step S721).

In the normal operation mode, normal wireless communication is performedbetween device A and device B in accordance with wireless informationset by the above communication.

In the first embodiment, no information about the execution ofprocessing such as special encryption is specified in association withwireless information (Configuration parameter data) transmitted in awireless information response 512. However, encrypting the abovewireless information in addition to comparison between individualidentification codes makes it possible to prevent unauthorized accessand tapping from other terminals.

As described above, according to the first embodiment, since device Aacquires wireless communication setting parameters from device B byusing wireless communication in the Anonymous mode, parameter settingoperation can be simplified. In addition, in wireless communication inthis Anonymous mode, device B can authenticate device A by using anindividual identification code acquired by wired communication. This canprevent other devices from acquiring wireless setting information byspoofing, thereby maintaining security.

<Second Embodiment>

The second embodiment will be described next. The first embodiment hasexemplified pairing of wireless information of device A and device Busing individual identification codes. The second embodiment willexemplify a group pairing method which allows pairing of wirelessinformation with other devices in addition to device A and device B byusing group identification codes. Specific operation of an apparatusaccording to the second embodiment will be described below withreference to the configuration view of FIG. 7, the sequence chart ofFIG. 8, and the flowcharts of FIGS. 9A, 9B, 10A, 10B, 11A and 11B.

FIG. 7 is a configuration view showing an overall wireless systemaccording to the second embodiment. A device A (image capturing device)400 and device B (printer) 401 are connected to each other through awired cable 404. A device C (cellular phone) 402 and device D (laptopPC) 403 which can input identical group identification codes are in astate wherein group pairing can be done. Note that the arrangements ofthe image capturing device 400 and printer 401 are the same as those inthe first embodiment (FIG. 1). In addition, since the arrangements ofthe cellular phone 402 and laptop computer 403 are known, anillustration thereof will be omitted. Assume, however, that theycomprise programs which implement operations like those described withreference to FIGS. 8A, 8B, 11A and 11B.

FIGS. 8A and 8B are sequence chart showing the overall operation of thewireless system according to the second embodiment. The sequence inFIGS. 8A and 8B will be described below.

When device A (digital camera 400) is wired connected to device B(printer 401) (801), device A issues a pairing start request to device B(802). In response to this request, device B transmits a pairing startconfirmation to device A (803). Device A then transmits a groupidentification code representing the same group to device B (804).Device B transmits a group identification code confirmation asconfirmation information (805), and device A and device B shift to theAnonymous mode (806, 807).

Device A transmits a wireless connection request to device B (808), anddevice B transmits a wireless connection response as a response to therequest (809). Device A then wirelessly transmits a wireless informationrequest frame containing the group identification code previouslytransmitted by wired connection to device B (810). Device B compares thegroup identification code with the one previously received by wire. Ifthey coincide with each other, device B transmits a wireless informationresponse (Configuration parameter data 308 such as an ESSID, encryptionmethod, and authentication method) to device A (811). Thereafter, deviceA transmits a wireless disconnection request (812). In response to this,device B returns a wireless disconnection response to device A (813).After the disconnection, device A shifts to the normal mode (830).

With respect to other devices C and D, wireless communication is startedin the Anonymous mode in accordance with an instruction from the user(814, 815). Assume that the same group identification code as thatpreviously transferred from device A to device B by wire is input andstored in each of devices C and D. Device C transmits a wirelessconnection request to device B (816). Device B transmits a wirelessconnection response to device C (817). Device C then transmits awireless information request frame containing the previously input groupidentification code to device B (818). Device B compares the groupidentification code acquired from device A by wire with this groupidentification code. If they coincide with each other, device Btransmits, to device C, a wireless information response containing thesame parameter data as Configuration parameter data 308 transmitted todevice A (819). Device C transmits a wireless disconnection requestafterward (820), and device B returns a wireless disconnection responseto device C in response to the request (821). Thereafter, device Cshifts to the normal mode (823). Since the same flow of the sequence asthat for device C is applied to device D, a description thereof will beomitted (824 to 829, 832). When a predetermined time elapses, device Balso shifts to the normal mode (831).

FIGS. 9A and 9B are flowcharts showing the detailed operation of deviceA according to the second embodiment. The operation of device A will bedescribed in detail below with reference to FIGS. 9A and 9B.

Upon confirming that wired connection is established (step S901), theuser is made to input a group identification code representing theunique ID of the group through a predetermined user interface (stepS902). Alternatively, group identification information which isstored/held in advance may be read out from the memory. Device Atransmits a pairing start request through the wired connection (stepS903, 802). Device A starts the pairing timer (step S904), and waits forthe reception of a pairing start confirmation (step S905) until thetimeout of the pairing timer occurs (step S906). If a pairing startconfirmation is received before the occurrence of timeout (803), thegroup identification code input in step S902 is transmitted through thewired connection (step S907, 804). Device A waits for the reception of agroup identification code confirmation indicating a group identificationcode permission (step S908). If a group identification rejection isreceived (step S909) or timeout occurs (step S910), informationindicating a pairing failure is displayed (step S922).

If a group identification code confirmation is normally received (805),wireless information setting (wireless information setting for Anonymouscommunication) for registration is performed (step S911), and a wirelessconnection request is wirelessly transmitted in the Anonymous mode (stepS912, 808). Device A then waits for the reception of a wirelessconnection response from a remote device until the occurrence of timeout(steps S913 and S914). Upon receiving a wireless connection response(809), device A transmits a wireless information request containing thesame group identification code as that transmitted through wiredconnection in step S907 (step S915, 810). Device A waits for thereception of a wireless information response (step S916) until theoccurrence of timeout (step S921). Upon reception of a wirelessinformation response before the occurrence of timeout (811), device Achecks whether the group identification code in the received framecoincides with the previously input group identification code (stepS917). If they coincide with each other, device A stores the wirelessinformation contained in the wireless information response (step S918).

Device A issues a wireless disconnection request (step S923, 812), andwaits for a wireless disconnection response until the occurrence oftimeout (steps S924 and S925). Upon receiving a wireless disconnectionresponse before the occurrence of timeout (813), device A startscommunication in the normal mode by using the wireless informationstored in step S918 (step S926, 830). Device A then stops the pairingtimer (step S919) and displays information indicating a pairing success(step S920). If timeout occurs at each portion (step S906, S910, S914,S921, or S925), pairing failure display indicating that pairing hasfailed is performed (step S922).

FIGS. 10A and 10B are flowcharts showing the detailed operation ofdevice B in the second embodiment. The operation of device B will bedescribed in detail below with reference to FIGS. 10A and 10B.

Device B checks whether wired connection has been performed (step S1001,801). If wired connection has been performed, device B waits for thereception of a pairing start request from a remote device in this wiredconnection (device A) (step S1002). Upon receiving a pairing startrequest (802), device B transmits a pairing start confirmation (stepS1003, 803). Then Device B waits for the reception of a groupidentification code representing the individual ID of a group throughwired connection (step S1004). Then the Device B receives the groupidentification code (804), device B checks whether the groupidentification code is permitted (pairing is OK) (step S1005). Ifpairing is OK, device B transmits a group identification code permissionas a group identification code confirmation (step S1008, 805). Ifpairing is to be rejected, device B transmits a group identificationcode rejection (step S1007), and stops the pairing timer, therebyterminating this processing (step S1007).

When pairing is permitted, device B sets wireless communication in theAnonymous mode by using wireless information for registration (stepS1009, 806), and stars transmitting a beacon with designated wirelessinformation (step S1010). At the same time, device B starts the pairingtimer (step S1011). Device B then waits for information indicating thecompletion of wireless connection to an opposing device, which istransmitted wirelessly (step S1012), until timeout occurs (aperture stopS1013). Note that when device B receives a wireless connection requestfrom the opposing device (device A) (812) and returns a wirelessconnection response in response to this request (813), wirelessconnection is complete.

If information indicating the completion of wireless connection isreceived before timeout, device B continuously waits for the receptionof a wireless information request (step S1014) until timeout occurs(step S1015). Upon receiving a wireless information request beforetimeout, device B checks whether the group identification code added tothe wireless information request coincides with the group identificationcode transmitted through the previous wired connection (step S1016). Ifthey do not coincide with each other, device B transmits a wirelessinformation request rejection (step S1018), and stops the pairing timer,thereby terminating this processing (step S1027). If they coincide witheach other, device B transmits a wireless information responsecontaining parameters necessary for wireless connection (theConfiguration parameter data 308 such as an ESSID serving as a networkidentifier, encryption method to be used, and authentication method)(step S1017).

Device B then waits for the reception of a wireless disconnectionrequest (step S1019) until the occurrence of the timeout of the pairingtimer (step S1021). Upon receiving a wireless disconnection request(812), device B transmits a wireless disconnection response (step S1020,813). Subsequently, device B checks the reception of a wirelessinformation request from other devices (corresponding to devices C and Din this embodiment) (step S1022) until the occurrence of the timeout ofthe pairing timer (step S1023). Note that the reception of wirelessinformation requests is performed through the reception of wirelessconnection requests from other devices (816, 824) and the transmissionof responses (817, 825). Upon receiving a wireless information request(818, 826), device B checks whether the group identification code of thereceived frame coincides with the group identification code receivedfrom device A through wired connection (step S1024). If they coincidewith each other, device B transmits a wireless information responsecontaining the same parameter data as the Configuration parameter data308 transmitted to device A (step S1026, 819, 827). If they do notcoincide with each other, device B transmits a wireless informationrequest rejection (step S1025). Upon receiving a wireless disconnectionrequest from the corresponding device before the occurrence of timeout(step S1019, 820, 828), device B transmits a wireless disconnectionresponse to the device (step S1020, 821, 829). Thereafter, the flowshifts the processing in step S1022 and subsequent steps.

If the occurrence of timeout is detected in step S1013, S1015, S1021, orS1023, the flow advances to step S1027 to stop the pairing timer (stepS1026), thereby terminating this processing.

FIGS. 11A and 11B are flowcharts showing the detailed operation ofdevice C and device D according to the second embodiment. The operationof device C and device D will be described below in detail withreference to FIGS. 11A and 11B.

When wireless communication in the Anonymous mode is instructed by useroperation, device C or D is set in a state wherein the same groupidentification code as that used by device A is input, and inputs agroup identification code by user operation (step S1100). Device C or Dthen sets wireless information for registration (step S1101, 814, 815),and starts the pairing timer (step S1102). Device C or D transmits awireless connection request to device B (step S1103, 816, 824). Device Cor D then waits for the reception of information indicating thecompletion of wireless connection (step S1104) until the occurrence oftimeout (step S1106). Upon receiving information indicating thecompletion of wireless connection before the occurrence of timeout (817,825), device C or D transmits a wireless information request containinga group identification code after the completion of connection (stepS1105, 818, 826).

Device C or D then waits for the reception of a wireless informationresponse from device B (step S1107) until the occurrence of timeout(step S1110). Upon receiving a wireless information response (819, 827)before the occurrence of timeout, device C or D checks whether the groupidentification code in the received frame coincides with the previouslyinput group identification code (step S1108). If the groupidentification codes coincide with each other, the received wirelessinformation is stored (step S1109). Thereafter, device C or D issues awireless disconnection request (step S1014, 820, 828), and waits for awireless disconnection response until the occurrence of timeout (stepsS1015 and S1016). Upon receiving a wireless disconnection responsebefore the occurrence of timeout (821, 829), device C or D startscommunication in the normal mode by using the wireless informationstored in step S1109 (step S1017, 831, 832).

Device C or D then stops the pairing timer (step S1111), and displaysinformation indicating a pairing success (step S1112). If timeout occursin step S1106, S1110, or S1016, information indicating a pairing failureis displayed (step S1113).

According to the above description, it is assumed that the users ofdevices A, C, and D input group identification codes. However, groupidentification codes may be automatically generated to reduce the loadon the users. A method of reducing the load on users will be describedwith reference to FIGS. 15 and 16. FIG. 15 is a view showing data as aseed (base information) for the generation of a group identificationcode and computation therefor. An adhoc network in a wireless LAN formsan IBSS (Independent Basic Service Set) as a network which requires nobase station and comprises only terminal stations. In adhoc networkconnection, devices constituting an IBSS transmit a beacon to eachother. In this description, a group identification code is calculatedfrom a BSSID (Basic Service Set Identification) as information containedin this beacon and a private key commonly shared by the respectivedevices in advance. Note that a BSSID is the identifier of an adhocnetwork generated for each adhoc network connection.

Device A performs the following processing instead of the processing instep S902 described with reference to FIG. 9A. That is, when device Aand device B are wired connected, device A determines a BSSID for theformation of an adhoc network in the Anonymous mode. Device A calculatesa group identification code by performing predetermined computation forthis BSSID and a private key shared by the respective devices. Referringto FIG. 15, a BSSID is randomly determined, and a group identificationcode is determined by multiplying the BSSID by a private key.

Subsequently, in step S903, device A sends a pairing start request todevice B through wired connection. In step S904, the pairing timer isstarted. Upon receiving a pairing start confirmation from device B,device A transmits the calculated group identification code throughwired connection (step S907). Device A waits for the reception of agroup identification code confirmation indicating a group identificationcode permission (step S908).

Device A which has performed wireless information setting forregistration and started operation in the Anonymous mode in step S911transmits the determined BSSID upon containing it in a beacon, andbecomes a creator for an adhoc network in the Anonymous mode.

Other processing in device A is the same as that described withreference to FIGS. 9A and 9B, and hence a description thereof will beomitted.

FIG. 16 is a flowchart for the generation of a group identification codeby device C or D. The processing in FIG. 16 is executed instead of theprocessing in steps S1100 and S1101 described with reference to FIGS.11A to 11C. Since the processing in device C is the same as that indevice D, the processing in device C will be described below.

When wireless communication in the Anonymous mode is instructed by theuser, device C sets an SSID as wireless information for registration(S1601), and transmits Probe Request (S1602). Since device A has alreadygenerated a network, device C receives Probe Response as a response toit (S1603). Device C extracts BSSID=A1 contained in received ProbeResponse (S1604). Device C reads out a private key A2 stored in advance(S1605), and performs computation with the above private keys A1 and A2(FIG. 15) to generate the same group identification ID as thatcalculated by device A (S1606). Device C sets the BSSID acquired in stepS1604 as a wireless parameter (S1607). That is, adhoc network setting isperformed by using the SSID set in step S1601 and the BSSID set in stepS1607 as parameters. The processings in step S1102 and subsequent stepsin FIGS. 11A to 11C are started.

As described above, according to the second embodiment, groupidentification codes are transmitted/received by wired communication,and wireless setting information is exchanged. Setting information canalso be exchanged, by using wireless communication in the Anonymousmode, with other devices which have the same group identification codebut are not wired connected. This provides the effect of makingparameter setting in wireless communication without cumbersome operationby a user.

In the second embodiment described above, there is no specificdescription about processing such as special encryption associated withwireless information (Configuration parameter data) in particular.Obviously, however, encrypting the above wireless information as well ascomparing group identification codes can prevent unauthorized access andtapping from terminals other than those belonging to the group. Inaddition, since the first and second embodiments mainly differ in onlyindividual identification codes and group identification codes, there isprovided a unique effect of implementing feature expansion up to groupregistration without any great change. Furthermore, generating a groupidentification code by using a random number (BSSID) generated everytime a wireless network is formed makes it possible to provide a uniqueeffect of eliminating the necessity to make a user input any complicatedgroup identification code.

<Third Embodiment>

The third embodiment will be described next. The second embodiment hasexemplified the group pairing method which can perform pairing ofwireless information between device A and device B in addition to otherdevices using group identification codes. The third embodiment willexemplify a case wherein in addition to the execution of the abovemethod, information indicating whether pairing has succeeded/failed isnotified to device A having a means for displaying informationindicating a pairing success/failure with respect to itself and otherdevices.

The specific operation of each device according to the third embodimentwill be described in detail below with reference to the sequence chartsof FIGS. 12A and 12B. Since a flowchart for the operation of each deviceis almost the same as in the second embodiment (FIGS. 9A, 9B, 10A, 10B,11A and 11B), a flowchart for each device will be omitted here. The samereference numerals as in FIGS. 8A and 8B denote the same operations inFIGS. 12A and 12B, and a detailed description thereof will be omitted.

When device B transmits a wireless disconnection response to device A(813), device B transmits information indicating a pairing success fordevice A to device A by using wired connection (1211). Transmittinginformation indicating whether pairing has succeeded/failed by usingwired connection instead of wireless connection makes it possible toreliably notify a remote device side of a cause of a pairing failure orthe like. That is, information indicating a success can be reliably sentas long as it is transmitted by wire, even in a case wherein a radiowave condition abruptly deteriorates and it takes much time tocommunicate only a last signal representing a success even iftransmission/reception and setting of wireless information for pairingitself have been performed.

When pairing succeeds in the exchange of information (816 to 821)between device B and other device C, device B transmits a wirelessdisconnection response to device C (821). In addition to transmittingthis wireless disconnection response, device B transmits informationindicating a pairing success for device C to device A through wiredconnection (1212). In response to the reception of the wirelessdisconnection response from device B, device C shifts to the normal mode(823). The same sequence as that for device C is applied to device D.When pairing succeeds, information indicating the success (pairingsuccess for device D) is transmitted from device B to device A throughwired connection (1213). Device B notifies device A of the end of grouppairing upon timeout of pairing or the like by using wired connection(1214). Device B and Device A shift to the normal mode (1231, 1232).

Note that the above operation of device B is implemented by transmittinginformation indicating a pairing success for a corresponding device (adevice to which a wireless disconnection response is transmitted) todevice A after the transmission of a wireless disconnection response instep S1020 in the flowchart of FIG. 10B. When the pairing timer timesout, device B stops the pairing timer in step S1027 and notifies deviceA of the end of group pairing.

Device A displays information about the pairing success terminal on thebasis of the notification of the pairing success by performing theprocessing in steps S1303 to S1306 to be described later with referenceto FIG. 13C in the fourth embodiment.

According to the third embodiment described above, device B can notifydevice A by wire whether pairing for the device B has succeeded andwhich other devices have succeeded in pairing. Therefore, device A candisplay such information on the display device, and hence can notify theuser of the pairing condition in a way easy to understand.

<Fourth Embodiment>

The fourth embodiment will be described next. According to the thirdembodiment, in the group pairing method which allows pairing of wirelessinformation with respect to not only device A and device B but alsoother devices by using group identification codes, the device B notifiesinformation indicating a pairing success/failure as to itself and otherdevices is notified to device A having the display device. In additionto this, the fourth embodiment will exemplify a case wherein the maximumnumber of devices which can be registered as a group is set in advance.Note that the exchange of information between the respective devices inthe system is the same as that in the third embodiment (FIGS. 12A and12B), and hence its illustration and description will be omitted.

FIGS. 13A to 13C are flowcharts showing the detailed operation of deviceA in the fourth embodiment. The operation of device A will be describedin detail below with reference to FIGS. 13A to 13C.

The same step numbers as in FIGS. 9A and 9B denote the same processingsteps in FIGS. 13A to 13C, and a detailed description thereof will beomitted. In addition to the processing shown in FIGS. 9A and 9B, theflowcharts of FIGS. 13A to 13C include the registration of the number ofdevices as a group, the processing of notifying device B of the numberof devices to be registered as a group (steps S1301 and S1302), and theprocessing of displaying on the basis of a notification indicating apairing success (steps S1303 to S1305).

In the fourth embodiment, a group identification code is input (stepS902), and the number of devices to be registered as a group is input(step S1301). Upon receiving a pairing start response (step S905),device A transmits the group identification code and the number ofdevices to be registered as a group to device B (step S1302).

After information indicating a pairing success between device B anddevice A is displayed (step S920) or information indicating a pairingfailure is displayed (step S922), device A monitors data receivedthrough wired connection to check the pairing conditions of otherdevices (step S1303). Upon receiving pairing success terminalinformation (step S1305), device A updates the pairing success terminalinformation display (step S1306). This processing is repeated until thereception of information indicating the end of group pairing from deviceB (step S1304). Assume that in pairing success terminal informationdisplay in this embodiment, for example, the registered names of deviceswhich have succeeded in pairing, which are contained in pairing successterminal information, are sequentially added to the list and displayed.If some terminals (including itself) have failed in pairing due towireless interference or the like, automatic registration can be retriedfor only such failure terminals by using the same group identificationcode. In this case, displaying a list like that described above allowsdevice A serving as a master device of the device group to grasp theprogress of registration.

The operation of device B will be described next. FIGS. 14A to 14C areflowcharts for explaining the detailed operation of device B accordingto the fourth embodiment. The operation of device B will be describedbelow with reference to FIGS. 14A to 14C. The same step numbers as inFIGS. 10A and 10B denote the same processing steps in FIGS. 14A to 14C,and a detailed description thereof will be omitted.

In the second embodiment (FIGS. 10A and 10B), device B waits for thereception of a group identification code in step S1004. In contrast, inthe fourth embodiment, device B waits for the reception of a groupidentification code and the input number of devices to be registered asa group (step S1401). In addition, upon transmitting a groupidentification code permission in step S1008, device B clears a counter“registration count” for counting the number of devices to be registeredas a group to 0 (step S1402).

If pairing with each device has succeeded, and a wireless disconnectionresponse is transmitted in step S1020, device B transmits group pairingsuccess terminal information indicating devices which have succeeded inthe pairing through wired connection (step S1403). The counter“registration count” is incremented by one (step S1404). Device B thenchecks by comparison whether the registration count has exceeded thenumber of devices to be registered as a group whose reception isconfirmed in step S1401 (step S1405). If the registration count hasexceeded the number of devices to be registered as a group, device Btransmits information indicating the end of group pairing to device A(step S1406), and stops the pairing timer (step S1027). If theregistration count is less than the number of devices to be registeredas a group, the flow advances to step S1022 and subsequent steps toperform pairing with other devices.

According to the fourth embodiment, device A transmits the maximumnumber of devices permitted to be registered as a group to device B inaddition to an identification code unique to the group. This makes itpossible to explicitly limit the number of devices to be registered.

Each embodiment described above is configured such that device A anddevice B exchange identification codes unique to the devices by usingwired connection. However, near field communication connection may beused instead of wired connection between device A and device B. In thethird and fourth embodiments, device B notifies device A of pairingsuccesses for devices A, C, and D through wired connection. However,device B may wirelessly notify device A of such information. Whennotification is done through wired connection, a communication failuredue to interference and the like can be prevented. In addition,notification through wired connection makes it possible to notify acause of a pairing failure if it occurs.

The present invention incorporates a case wherein programs of softwarefor implementing the functions of the embodiments described above(programs corresponding to the flowcharts shown in the accompanyingdrawings in the embodiments) are directly or remotely supplied to asystem or apparatus to cause the computer of the system or apparatus toread out and execute the programs, thereby implementing the functions.

The program codes themselves which are supplied and installed in thecomputer to allow the computer to implement the functions/processing ofthe present invention also realize the present invention. That is, thecomputer programs themselves, which implement the functions/processingof the present invention, are also incorporated in the presentinvention.

In this case, each program may take any form, e.g., an object code, aprogram executed by an interpreter, and script data supplied to an OS,as long as it has the function of the program.

As a recording medium for supplying the programs, a floppy (registeredtrademark) disk, hard disk, optical disk, magnetooptical disk, MO,CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD(DVD-ROM or DVD-R), or the like can be used.

In addition, methods of supplying the programs include the following. Aclient computer connects to a home page on the Internet by using abrowser to download each computer program of the present inventionitself from the home page or download a compressed file containing anautomatic install function into a recording medium such as a hard disk.Alternatively, the programs can be supplied by dividing the programcodes constituting each program of the present invention into aplurality of files, and downloading the respective files from differenthome pages. That is, the present invention also incorporates a WWWserver which allows a plurality of users to download program files forcausing the computer to execute the functions/processing of the presentinvention.

In addition, the functions/processing of the present invention can beimplemented by encrypting the programs of the present invention, storingthe encrypted data in storage media such as CD-ROMs, distributing themto users, allowing users who satisfy a predetermined condition todownload key information for decryption from a home page through theInternet, executing the encrypted programs using the key information,and allowing a computer to install the programs.

The functions of the above embodiments are implemented not only when thereadout programs are executed by the computer but also when the OSrunning on the computer performs part or all of actual processing on thebasis of the instructions of the programs.

The functions of the above embodiments are also implemented when theprograms read out from the recording medium are written in the memory ofa function expansion board inserted into the computer or a functionexpansion unit connected to the computer, and the CPU of the functionexpansion board or function expansion unit performs part or all ofactual processing on the basis of the instructions of the programs.

According to the present invention, communication parameters can beeasily and safely set between communication devices. In addition,according to another aspect of the present invention, communicationparameters can be safely and quickly set for three or more communicationdevices.

As many apparently widely different embodiments of the present inventioncan be made without departing from the spirit and scope thereof, it isto be understood that the invention is not limited to the specificembodiments thereof except as defined in the claims.

CLAIM OF PRIORITY

This application claims priority from Japanese Patent Application No.2004-336221 filed on Nov. 19, 2004 and Japanese Patent Application No.2005-317117 filed on Oct. 31, 2005, which are hereby incorporated byreference herein.

What is claimed is:
 1. A first communication apparatus comprising: afirst reception unit configured to receive first information from asecond communication apparatus via a near field communication; a secondreception unit configured to receive second information from the secondcommunication apparatus via a wireless communication according to afirst wireless communication method different from the near fieldcommunication; an authentication unit configured to performauthentication processing based on the first and the second information;and a first transmitting unit configured to transmit, in accordance witha result of the authentication processing, a first communicationparameter used for performing a wireless communication according to thefirst wireless communication method to the second communicationapparatus via a wireless communication according to the first wirelesscommunication method, wherein the first communication parametercomprises at least one of a Service Set IDentifier, encryption type,encryption key and authentication type, wherein the first communicationapparatus wirelessly communicates with the second communicationapparatus using the first communication parameter transmitted by thefirst transmitting unit.
 2. The apparatus according to claim 1, whereinthe first wireless communication method is based on IEEE 802.11standard.
 3. The apparatus according to claim 1, wherein the firstcommunication parameter comprises Service Set IDentifier, encryptiontype and authentication type.
 4. The apparatus according to claim 1,wherein the first communication parameter comprises encryption type andauthentication type.
 5. The apparatus according to claim 1, wherein thefirst communication parameter is a credential that is issued by thefirst communication apparatus and that allows the second communicationapparatus to gain access to a wireless network.
 6. The apparatusaccording to claim 1, further comprising: a disconnection unitconfigured to disconnect wireless communication with the secondcommunication apparatus if the authentication processing succeeded andthe transmission of the first communication parameter is completed,wherein the wireless communication is a wireless connection based on thefirst wireless communication method; and a connection unit configured toreconnects with the second communication apparatus using the firstwireless communication method based on the first communication parameterafter the disconnection by the disconnecting unit.
 7. The apparatusaccording to claim 1, wherein the second transmitting unit encrypts andtransmits the first communication parameter.
 8. The apparatus accordingto claim 1, wherein the first information indicates a password of thesecond communication apparatus, wherein the second information indicatesa password of the second communication apparatus.
 9. The apparatusaccording to claim 1, wherein the second information is obtained bycalculating PIN in accordance with a predetermined algorithm.
 10. Theapparatus according to claim 1, wherein the first information indicatesan identifier of the second communication apparatus, wherein the secondinformation indicates an identifier of the second communicationapparatus.
 11. The apparatus according to claim 1, wherein the firstinformation indicates PIN, wherein the second information indicates PIN.12. The apparatus according to claim 1, wherein the first information isunique and randomly information, wherein the second information isunique and randomly information.
 13. The apparatus according to claim 1,wherein the first information is unique, randomly generated information,wherein the second information is unique, randomly generatedinformation.
 14. The apparatus according to claim 1, wherein the firstinformation is received by the first reception unit before the secondinformation is received by the second reception unit.
 15. The apparatusaccording to claim 1, wherein the second reception unit receives thesecond information from the second apparatus in a case where the firstcommunication apparatus and the second communication apparatus start afirst operation mode.
 16. The apparatus according to claim 15, whereinthe first operation mode is a mode in which a communication betweenapparatuses operating in the first operation mode is permitted even ifthe apparatuses do not share an encryption key for communicating in thefirst communication method.
 17. The apparatus according to claim 16,wherein at least portion of a communication parameter used forcommunication with the second communication apparatus in the firstoperation mode is different from at least portion of a communicationparameter used for communication with the second communication apparatusnot in the first operation mode.
 18. A method of controlling a firstcommunication apparatus, the method comprising: a first reception stepof receiving first information from a second communication apparatus viaa near field communication; a second reception step of receiving secondinformation from the second communication apparatus via a wirelesscommunication according to a first wireless communication methoddifferent from the near field communication; an authentication step ofperforming authentication processing based on the first and the secondinformation; and a first transmitting step of transmitting, inaccordance with a result of the authentication processing, a firstcommunication parameter used for performing a wireless communicationaccording to the first wireless communication method to the secondcommunication apparatus via a wireless communication according to thefirst wireless communication method, wherein the first communicationparameter comprises at least one of a Service Set IDentifier, encryptiontype, encryption key and authentication type, wherein the firstcommunication apparatus wirelessly communicates with the secondcommunication apparatus using the first communication parametertransmitted in the first transmitting step.
 19. A non-transitorycomputer readable storage medium storing a program causing a computer toexecute the method according to claim
 18. 20. A first communicationapparatus comprising: a first transmission unit configured to transmitfirst information to a second communication apparatus via a near fieldcommunication; and a second transmission unit configured to transmitsecond information to the second communication apparatus via a wirelesscommunication based on a first wireless communication different from thenear field communication; a reception unit configured to receive, via awireless communication based on the first wireless communication method,a first communication parameter for performing a wireless communicationbased on the first wireless communication, which is transmitted from thesecond communication apparatus in accordance with a result of anauthentication processing wherein the authentication processing isperformed by the second wireless communication apparatus based on thefirst information and the second information, wherein the firstcommunication parameter comprises at least one of a Service SetIDentifier, encryption type , encryption key and authentication type,wherein the first communication apparatus wirelessly communicates withthe second communication apparatus using the first communicationparameter received by the reception unit.
 21. The apparatus according toclaim 20 wherein the first wireless communication method is based onIEEE 802.11 standard.
 22. The apparatus according to claim 20, whereinthe first communication parameter comprises Service Set IDentifier,encryption type and authentication type.
 23. The apparatus according toclaim 20, wherein the first communication parameter comprises encryptiontype and authentication type.
 24. The apparatus according to claim 20,further comprising: a disconnection unit configured to disconnect awireless connection with the second communication apparatus aftercompletion of receiving the first communication parameter by thereception unit wherein the wireless communication is a wirelessconnection using the first wireless communication method; and areconnection unit configured to reconnect to the second communicationapparatus via the first wireless communication method using the firstcommunication parameter after disconnection by the disconnection unit.25. The apparatus according to claim 20, wherein the reception unitreceives the first communication parameter that has been encrypted. 26.The apparatus according to claim 20, wherein the first communicationapparatus transmits the second information to the second communicationapparatus.
 27. The apparatus according to claim 20, wherein the firstinformation indicates a password of the first communication apparatus,wherein the second information indicates a password of the firstcommunication apparatus.
 28. The apparatus according to claim 20,further comprising a calculation unit configured to obtain the firstinformation by calculating PIN in accordance with a predeterminedalgorithm.
 29. The apparatus according to claim 20, wherein the firstinformation indicates an identifier of the first communicationapparatus, wherein the second information indicates an identifier of thefirst communication apparatus.
 30. The apparatus according to claim 20,wherein the first information indicates PIN, wherein the secondinformation indicates PIN.
 31. The apparatus according to claim 20,wherein the first information is unique and randomly information,wherein the second information is unique and randomly information. 32.The apparatus according to claim 20, wherein the first information isunique ,randomly generated information, wherein the second informationis unique, randomly generated information.
 33. The apparatus accordingto claim 20, wherein the first information is transmitted by the firsttransmission unit before the second information is transmitted by thesecond transmission unit.
 34. The apparatus according to claim 20,wherein the second transmission unit transmits the second information tothe second apparatus in a case where the first communication apparatusand the second communication apparatus start a first operation mode. 35.The apparatus according to claim 34, wherein the first operation mode isa mode in which a communication between apparatuses operating in thefirst operation mode is permitted even if the apparatuses do not sharean encryption key for communicating in the first communication method.36. The apparatus according to claim 35, wherein at least portion of acommunication parameter used for communication with the secondcommunication apparatus in the first operation mode is different from atleast portion of a communication parameter used for communication withthe second communication apparatus not in the first operation mode. 37.A method of a first communication apparatus, the method comprising: afirst transmission step of transmitting first information to a secondcommunication apparatus via a near field communication; a secondtransmission step of transmitting second information to the secondcommunication apparatus via a wireless communication based on a firstwireless communication different from the near field communication; areception step of receiving, via a wireless communication based of thefirst wireless communication method, a first communication parameter forperforming a wireless communication based on the first wirelesscommunication, which is transmitted from the second communicationapparatus in accordance with a result of an authentication processing,wherein the authentication processing is performed by the secondwireless communication apparatus based on the first information and thesecond information, wherein the first communication parameter comprisesat least one of a Service Set IDentifier, encryption type , encryptionkey and authentication type, wherein the first communication apparatuswirelessly communicates with the second communication apparatus usingthe first communication parameter received in the reception step.
 38. Anon-transitory computer readable storage medium storing a program forcausing a computer to execute the method according to claim 37.